import Vue from 'vue'
import Cookies from './cookies';
import FastClick from 'fastclick';
import defaultSettings from '@config/defaultSettings';
import VueStorage from 'vue-ls';
import './inject'
import './antd'
import './components'

const lang = Cookies.get( 'lang' ) || 'zh-cn';
Vue.config.lang = lang;

if ( 'addEventListener' in document ) {
  document.addEventListener( 'DOMContentLoaded', function () {
    FastClick.attach( document.body )
  }, { passive: true } )
}

Vue.use(VueStorage, defaultSettings.storageOptions);